<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: ianimate</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: ianimate</td>
      <td class="subheader-left"><a href="matlab:open ianimate">View code for ianimate</a></td>
    </tr>
  </table>
<h1>ianimate</h1><p><span class="helptopic">Display an image sequence</span></p><p>
<span style="color:red">ianimate</span>(<strong>im</strong>, <strong>options</strong>) displays a greyscale image sequence <strong>im</strong> (HxWxN) or
a color image sequence <strong>im</strong> (HxWx3xN) where N is the number of frames in
the sequence.

</p>
<p>
<span style="color:red">ianimate</span>(<strong>im</strong>, <strong>features</strong>, <strong>options</strong>) as above but with point features overlaid.
<strong>features</strong> (Nx1) is a cell array whose elements are vectors of feature
objects for the corresponding frames of <strong>im</strong>.  The feature is plotted
using the feature object's plot method and additional options are passed
through to that method.

</p>
<h2>Examples</h2>
<p>
Animate image sequence:

</p>
<pre style="width: 90%%;" class="examples">
ianimate(seq);
</pre>
<p>
Animate image sequence with overlaid corner features:

</p>
<pre style="width: 90%%;" class="examples">
c&nbsp;=&nbsp;icorner(im,&nbsp;'nfeat',&nbsp;200);&nbsp;&nbsp;%&nbsp;computer&nbsp;corners
ianimate(seq,&nbsp;c,&nbsp;'gs');&nbsp;&nbsp;%&nbsp;features&nbsp;shown&nbsp;as&nbsp;green&nbsp;squares
</pre>
<h2>Options</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1">'fps', F</td> <td>set the frame rate (default 5 frames/sec)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'loop'</td> <td>endlessly loop over the sequence</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'movie', M</td> <td>save the animation as a series of PNG frames in the folder M</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'npoints', N</td> <td>plot no more than N features per frame (default 100)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'only', I</td> <td>display only the I'th frame from the sequence</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'title', T</td> <td>displays the specified title on each frame, T is a cell
array (1xN) of strings.</td></tr>
</table>
<h2>Notes</h2>
<ul>
  <li>If titles are not specified the title is "frame N"</li>
  <li>If the 'movie' is used the frames can be converted to a movie
using a utility like ffmpeg, for instance:</li>
</ul>
<pre style="width: 90%%;" class="examples">
ffmpeg&nbsp;-i&nbsp;*.png&nbsp;-r&nbsp;5&nbsp;movie.mp4
</pre>
<p>
or to set the bit rate explicitly

</p>
<pre style="width: 90%%;" class="examples">
ffmpeg&nbsp;-i&nbsp;*.png&nbsp;-b:v&nbsp;64k&nbsp;movie.mp4
</pre>
<h2>See also</h2>
<p>
<a href="matlab:doc PointFeature">PointFeature</a>, <a href="matlab:doc iharris">iharris</a>, <a href="matlab:doc isurf">isurf</a>, <a href="matlab:doc idisp">idisp</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2012 Peter Corke.</p>
</body></html>